#!/bin/sh

echo "Please type the exact path to the image. I.E. /boot/home/myimage.iso"

read -p "The path: " imagepath #read in the path + name

#Pull out the settings

read < /boot/home/config/settings/writecd_prefs/writedevpos writedevpos
read < /boot/home/config/settings/writecd_prefs/devicespeed devicespeed

alert --warning "Are you sure you want to make a cd??" "YES" "NO"

retval=$?

 if [ $retval -eq 0 ]
then

  chmod -w $imagepath
  cdrecord -v dev=$writedevpos speed=$devicespeed -data $imagepath  
  chmod +w $imagepath
  alert "All done." "OK"
fi

